package cn.com.bluemoon.daps.sync.vo.model2dev;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author Jarod.Kong
 * @date 2021/6/17 13:57
 */
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Data
@ApiModel(description = "开发同步列表信息-查看表日志列表")
public class SyncTableTaskOut implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("行id（表同步任务id）")
    private String rowId;

    @ApiModelProperty("模型id")
    private String modelId;

    @ApiModelProperty("表id")
    private String tableId;

    @ApiModelProperty("ddl语句")
    private String ddl;

    @ApiModelProperty("同步状态，0：未同步、1：同步中、2：已同步、3：同步失败，")
    private Integer syncStatus;

    @ApiModelProperty("执行人")
    private String syncBy;

    @ApiModelProperty(value = "同步时间", example = "1970-01-01 00:00:00")
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8"
    )
    private LocalDateTime syncTime;

    @ApiModelProperty("任务类型，对应1：开发库同步、2：测试库同步")
    private Integer syncEnv;
}
